<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>多图片上传</title>
    <script src="jquery.js"></script>
</head>
<body>
<input type="file" id="uploadId" name="sourceFile" />
<img id="imageview" width="300px" height="300px" />

<textarea id="t1" style="width: 400px;height: 400px;"></textarea>
</body>

<script type="text/javascript">
        $(function() {
            $("#uploadId").change(function() {
                var $file = $(this);
                var objUrl = $file[0].files[0];
                //获得一个http格式的url路径:mozilla(firefox)||webkit or chrome
                var windowURL = window.URL || window.webkitURL;
                //createObjectURL创建一个指向该参数对象(图片)的URL
                var dataURL = windowURL.createObjectURL(objUrl);
                $("#imageview").attr("src", dataURL);

                $('#t1').val(dataURL);
            });
        });
    </script>
</html>